/**
 * UpdateContact请求对象
 *
 * @author sxf
 * @email sxf02615@163.com
 * @date 2025/1/15
 */
package com.sxf.crm.dto;


import com.sxf.crm.entity.Contact;
import com.sxf.crm.enums.DeleteStatus;
import lombok.Data;

import java.util.List;

@Data
public class UpdateContactRequest {
    private Long id;
    private String name;
    private String phone;
    private String email;
    private String position;
    private String remark;
    private Long customerId;
    private List<Long> departmentIds;
    private DeleteStatus deleteStatus;

    public Contact toContact() {
        Contact contact = new Contact();
        contact.setId(id);
        contact.setName(name);
        contact.setPhone(phone);
        contact.setEmail(email);
        contact.setPosition(position);
        contact.setRemark(remark);
        contact.setDeleteStatus(deleteStatus);

        return contact;
    }
}
